<template>
	<view class="wrap">
		<view class="list-cell">
			<image class="user-images" :src="model.avatar" v-if="model.avatar!=''"></image>
			<image class="user-images" :src="this.vuex_config.defaultAvatar" v-else></image>
			<view class="user-name">
				<span>{{model.realName}}</span><u-icon size="32" color="#f04d94" name="woman"></u-icon><br>
			</view>
		</view>
		<u-cell-group :border="false">
			<u-cell-item title="所属部门"  :value="model.deptName" :title-width="180" :arrow="false"></u-cell-item>
			<u-cell-item title="岗位"  :value="model.postName" :title-width="180" :arrow="false"></u-cell-item>
			<u-cell-item title="手机"  :value="model.phone" :title-width="180"></u-cell-item>
			<u-cell-item title="邮箱"  :value="model.email" :title-width="180"></u-cell-item>
			<u-gap height="20" bg-color="#f5f5f5"></u-gap>
		</u-cell-group>
	</view>
	
</template>
<script>
	 import HeadNavBar from '@/components/headnavbar/index';
/**
 * Copyright (c) 2013-Now http://aidex.vip All rights reserved.
 */
export default {
	components: {
	  HeadNavBar
	},
	data() {
		return {
			model: {
				sex: '1'
			}
		}
	},
	onLoad(param) {
		this.$u.api.user.detail({id:this.$route.query.id}).then(res => {
			if (res.code == '200'){
				this.model=res.data;
			}else if (res.result == 'login'){
				uni.reLaunch({
					url: '/pages/sys/login/index'
				});
			}else{
				this.$u.toast(res.message);
			}
		});
	},
	methods: {
		navTo(url) {
			uni.navigateTo({
				url: url
			});
		},
	}
};
</script>
<style lang="scss">
@import 'index.scss';
page {
	background-color: #f5f5f5;
}
.list-cell {
	display: flex;
	box-sizing: border-box;
	width: 100%;
	padding: 10px 24rpx;
	overflow: hidden;
	color: #323233;
	font-size: 14px;
	line-height: 24px;
	background-color: #fff;
	align-items: center;
	
}
.user-images{
	width: 80rpx;
	height: 80rpx;
	margin-right: 10px;
}
.user-name{
	font-size: 32rpx;
	color: #000000;
	span{
	}
	.user-other{
		font-size: 26rpx;
		color: #999999;
		font-weight: normal;
	}
}

</style>
